package com.yyw.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yyw.common.utils.PageUtils;
import com.yyw.gulimall.product.entity.AttrEntity;
import com.yyw.gulimall.product.entity.AttrGroupEntity;
import com.yyw.gulimall.product.vo.AttrAttrGroupVo;
import com.yyw.gulimall.product.vo.AttrGroupRelationVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author yiyw
 * @date 2020-10-24 11:59:19
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params, Long catelogId);

    /**
     * 根据属性分组ID查询出所有关联的属性
     *
     * @param attrGroupId
     * @return
     */
    List<AttrEntity> getAttrGroupAllAttr(long attrGroupId);

    /**
     * 删除属性与属性分组的关联关系
     *
     * @param relation
     */
    void delAttrRelationGroup(List<AttrGroupRelationVo> relation);

    /**
     * 根据分类ID查询所属分组和分组下的属性
     * @param catelogId
     * @return
     */
    List<AttrAttrGroupVo> getAttrByAttrGroupByCatelogId(long catelogId);
}

